package com.cbgolf.oa.event;

import com.cbgolf.oa.entity.ParkBean;
import com.cbgolf.oa.entity.ParkWayInfo;
import com.cbgolf.oa.entity.PlayerBean;
import com.cbgolf.oa.entity.PlayerBean.Player;
import com.cbgolf.oa.entity.StatisticsBean;
import com.cbgolf.oa.entity.TeeTimeBean;
import java.util.List;
import java.util.Map;

/**
 * @author lq
 * @date 2018/5/3
 */

public class EventPark {

  public int msgTarget;
  public int requestEvent;

  public String errorMsg;
  public int errorCode;

  public ParkBean parkBean;
  public List<TeeTimeBean> listTeetime;
  public List<StatisticsBean> listStatistics;
  public List<ParkWayInfo> listBusinessWays;
  public List<PlayerBean> listPersons;
  public int inParkNum;
  public String comePare;
  public Map<String, List<Player>> personMap;
  public int mType;

  public static class Builder {

    EventPark bean;

    public Builder() {
      bean = new EventPark();
    }

    public Builder setError(String error, int code) {
      bean.errorMsg = error;
      bean.errorCode = code;
      return this;
    }

    public Builder setParkBean(ParkBean data) {
      bean.parkBean = data;
      return this;
    }

    public Builder setListTeetime(List<TeeTimeBean> list) {
      bean.listTeetime = list;
      return this;
    }

    public Builder setListStatistics(List<StatisticsBean> list) {
      bean.listStatistics = list;
      return this;
    }

    public Builder setListBussinessWays(List<ParkWayInfo> list) {
      bean.listBusinessWays = list;
      return this;
    }

    public Builder setListPlayers(List<PlayerBean> list) {
      bean.listPersons = list;
      return this;
    }

    public Builder setInParkNum(int num) {
      bean.inParkNum = num;
      return this;
    }

    public Builder setCompare(String come) {
      bean.comePare = come;
      return this;
    }

    public Builder setPersonMap(Map<String, List<Player>> map) {
      bean.personMap = map;
      return this;
    }

    public Builder setRequestEvent(int event) {
      bean.requestEvent = event;
      return this;
    }

    public Builder setTarget(int target) {
      bean.msgTarget = target;
      return this;
    }

    public Builder setType(int type) {
      bean.mType = type;
      return this;
    }

    public EventPark build() {
      return bean;
    }
  }
}
